export const state = () => ({
	isLogin: false,
	user_data: {
		userid: '',
		name: '',
	}
});

const mutations = {
	setUser(state, v) {
		state.user_data = v
	},
	SET_isLogin(state, data) {
		state.isLogin = data;
	},
	set_user_id(state, value) {
		state.user_data.uid = value;
	},
	set_login_modal(state, value) {
		if( window.loginbox ){
			window.loginbox.show = true
		}
		//state.showLoginModal = value;
	}
};

export default {
	namespaced: true, //命名空间
	state,
	mutations
}